/**
 * 
 */
package leetCode;

/**
 * @author zhongfang
 *
 */
public class RangeAdditionII {
    public static int maxCount(int m, int n, int[][] ops) {
    	if(ops.length==0){//一样大
    		return m*n;
    	}
    			
        int a=m,b=n;
        for (int[] is : ops) {
			a=Math.min(a, is[0]);
			b=Math.min(b, is[1]);
		}
        return (a)*(b);
    }
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int m = 3, n = 3;
	     int[][] operations = {{2,2},{3,3}};
	     System.out.println(maxCount(m, n, operations));
	}

}
